<?php
class Specialty_model extends Mymodel {
	public $table_name = "specialty";
    function Specialty_model()
    {
        parent::Mymodel();
    }
	
	function get_specialty($id=NULL)
	{
		return $this->get_data($this->table_name, $id);
	}

	
	function insert_new_specialty($data)
	{
		return $this->insert_new_record($this->table_name , $data);
	}
	
	function update_specialty_by_id($data, $id)
	{
		return $this->update_by_id($this->table_name, $data, $id);
	}
	
	function delete_specialty_by_id($id)
	{
		$is_user_connected = $this->check_by_col('user' , 'specialty_id' , $id);
		if($is_user_connected > 0)
			return false;
		else
			return $this->delete_by_id($this->table_name , $id);
	}
}